package stu.sup.entity;

import java.io.Serializable;

public class Product implements Serializable {
    private Integer id;

    private String productName;

    private Double productPrice;

    private Double minProductPrice;

    private Double maxProductPrice;

    private String productDesc;

    private Integer productCommentId;

    private Integer productImgId;

    private Integer productClassId;

    private Integer productStock;

    private static final long serialVersionUID = 1L;

    public Product() {
    }

    public Product(Integer id, String productName, Double productPrice, String productDesc, Integer productCommentId, Integer productImgId, Integer productClassId, Integer productStock) {
        this.id = id;
        this.productName = productName;
        this.productPrice = productPrice;
        this.productDesc = productDesc;
        this.productCommentId = productCommentId;
        this.productImgId = productImgId;
        this.productClassId = productClassId;
        this.productStock = productStock;
    }

    public Double getMinProductPrice() {
        return minProductPrice;
    }

    public void setMinProductPrice(Double minProductPrice) {
        this.minProductPrice = minProductPrice;
    }

    public Double getMaxProductPrice() {
        return maxProductPrice;
    }

    public void setMaxProductPrice(Double maxProductPrice) {
        this.maxProductPrice = maxProductPrice;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName == null ? null : productName.trim();
    }

    public Double getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(Double productPrice) {
        this.productPrice = productPrice;
    }

    public String getProductDesc() {
        return productDesc;
    }

    public void setProductDesc(String productDesc) {
        this.productDesc = productDesc == null ? null : productDesc.trim();
    }

    public Integer getProductCommentId() {
        return productCommentId;
    }

    public void setProductCommentId(Integer productCommentId) {
        this.productCommentId = productCommentId;
    }

    public Integer getProductImgId() {
        return productImgId;
    }

    public void setProductImgId(Integer productImgId) {
        this.productImgId = productImgId;
    }

    public Integer getProductClassId() {
        return productClassId;
    }

    public void setProductClassId(Integer productClassId) {
        this.productClassId = productClassId;
    }

    public Integer getProductStock() {
        return productStock;
    }

    public void setProductStock(Integer productStock) {
        this.productStock = productStock;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", productName=").append(productName);
        sb.append(", productPrice=").append(productPrice);
        sb.append(", productDesc=").append(productDesc);
        sb.append(", productCommentId=").append(productCommentId);
        sb.append(", productImgId=").append(productImgId);
        sb.append(", productClassId=").append(productClassId);
        sb.append(", productStock=").append(productStock);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}